home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_riv_ambcndltemple.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  100 lines

  1. # Jones 3D Cog Script
  2. #
  3. # RIV_AmbCndlTemple.cog
  4. #
  5. # Plays random ambient sounds at random positions and drops
  6. # snow at all the positions all the time.
  7. #
  8. # [TRM]
  9. #
  10. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  11. # ========================================================================================
  12.  
  13. symbols
  14.  
  15.     message        entered
  16.     message     pulse
  17.  
  18.     thing        soundPos0        nolink
  19.     thing        soundPos1        nolink
  20.     thing        soundPos2        nolink
  21.     thing        soundPos3        nolink
  22.     thing        soundPos4        nolink
  23.     thing        soundPos5        nolink
  24.     
  25.     sector      start_Amb1      linkID=1
  26.     sector      start_Amb2      linkID=1
  27.     sector      start_Amb3      linkID=1
  28.     sector      start_Amb4      linkID=1
  29.     
  30.     sector      stop_Amb1       linkID=0
  31.     
  32.     sector      stop_Snow1      linkID=2
  33.     sector      stop_Snow2      linkID=2
  34.     
  35.     sound        ambient0=shw_amb1.wav   local
  36.     sound        ambient1=shw_amb2.wav   local
  37.     sound        ambient2=shw_amb3.wav   local
  38.     sound        ambient3=shw_amb4.wav   local
  39.     sound        ambient4=shw_amb5.wav   local
  40.     sound        ambient5=shw_amb6.wav   local
  41.     sound        ambient6=shw_amb7.wav   local
  42.     
  43.     template    tpl_Snow=skitosnow      local
  44.     
  45.     int         playing=0               local
  46.     int         noSnow=0                local
  47.     
  48. end
  49.  
  50. # ========================================================================================
  51.  
  52. code
  53.  
  54. entered:
  55.  
  56.     if((GetSenderID() == 1) && (playing == 0))
  57.     {
  58.         playing = 1;
  59.         noSnow = 0;
  60.         setpulse(2.0);
  61.     }
  62.     
  63.     if(GetSenderID() == 0)
  64.     {
  65.         playing = 0;
  66.         SetPulse(0.0);
  67.     }
  68.     
  69.     if(GetSenderID() == 2)
  70.     {
  71.         noSnow = 1;
  72.     }
  73.     
  74.     return;
  75.  
  76. # ========================================================================================
  77.  
  78. pulse:
  79.  
  80.     PlaySoundThing(ambient0[RandBetween(0, 6)], soundPos0[RandBetween(0, 5)], 1.0, 15, 30, 0);
  81.     
  82.     if(GetPerformanceLevel() >= 2)
  83.     {
  84.         if(noSnow == 0)
  85.         {
  86.             CreateThing(tpl_Snow, soundPos0);        
  87.             CreateThing(tpl_Snow, soundPos1);        
  88.             CreateThing(tpl_Snow, soundPos2);        
  89.             CreateThing(tpl_Snow, soundPos3);        
  90.             CreateThing(tpl_Snow, soundPos4);
  91.             CreateThing(tpl_Snow, soundPos5);
  92.         }
  93.     }
  94.     
  95.     return;
  96.  
  97. # ========================================================================================
  98.  
  99. end
  100.